# coding:utf-8

#
# str = input("请输入姓名：")
# print("用户输入的是" + str)

# 文件操作
# file = open("./files/测试.txt", "w")
# print("文件名称是" + file.name)
# print("文件是否关闭" + str(file.closed))
# print("文件的访问模式" + file.mode)


# 关闭文件
# file = open("./files/测试.txt", "w")
# print("文件是否关闭" + str(file.closed))
# file.close()
# print("文件是否关闭" + str(file.closed))


# 写入文件
# file=open("./files/测试.txt","w")
# file.write("hello world")
# file.close()

# 更改添加模式
# content=input("请输入姓名：")
# # file=open("./files/测试.txt","w")    #清空以前内容
# file=open("./files/测试.txt","a")     #在以前内容后面追加
#
# file.write(content)
# file.close()

# 读取文件
file = open("./files/测试.txt", "r")
content = file.read()
print(content)
